package com.niiwoo.civet.account.service.dubbo;

import com.alibaba.dubbo.config.annotation.Service;
import com.niiwoo.civet.account.dto.common.sendmessage.*;
import com.niiwoo.civet.account.service.MessageSendDubboService;
import com.niiwoo.civet.account.service.local.MessageSendLocalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by Jaylin on 2018/1/10.
 */
@Service(version = "1.0.0")
@Slf4j
public class MessageSendDubboServiceImpl implements MessageSendDubboService{

    @Autowired
    MessageSendLocalService messageSendLocalService;



    @Override
    public void sendLetterForRepaymentFromKaola(RepaymentSuccessDTO repaymentSuccessDTO) {
        messageSendLocalService.sendLetterForRepaymentFromKaola(repaymentSuccessDTO);
    }

    @Override
    public void sendLetterForRepayment(RepaymentSuccessDTO repaymentSuccessDTO) {
        messageSendLocalService.sendLetterForRepayment(repaymentSuccessDTO);
    }

    @Override
    public void sendLetterForRepaymentOverdue(RepaymentOverdueDTO repaymentOverdueDTO) {
        messageSendLocalService.sendLetterForRepaymentOverdue(repaymentOverdueDTO);
    }

    @Override
    public void sendSmsForRepaymentOverdue(RepaymentOverdueDTO repaymentOverdueDTO) {
        messageSendLocalService.sendSmsForRepaymentOverdue(repaymentOverdueDTO);
    }

    @Override
    public void sendNotfyForLendSuccess(LendSuccessNotifyDTO lendSuccessNotifyDTO) {
        messageSendLocalService.sendNotfyForLendSuccess(lendSuccessNotifyDTO);
    }

    @Override
    public void sendLetterForInvestReceive(InvestReceiveDTO investReceiveDTO) {
        messageSendLocalService.sendLetterForInvestReceive(investReceiveDTO);
    }

    @Override
    public void sendSmsForInvestReceive(InvestReceiveDTO investReceiveDTO) {
        messageSendLocalService.sendSmsForInvestReceive(investReceiveDTO);
    }

    @Override
    public void sendLetterForInvestReceiveAdvance(Byte batchRefundType, InvestReceiveAdvanceDTO investReceiveAdvanceDTO) {
        messageSendLocalService.sendLetterForInvestReceiveAdvance(batchRefundType, investReceiveAdvanceDTO);
    }

    /**
     * 发送还款提醒的站内信
     * @param repaymentRemindDTO
     */
    public void sendLetterForRepaymentRemind(RepaymentRemindDTO repaymentRemindDTO){
        messageSendLocalService.sendLetterForRepaymentRemind(repaymentRemindDTO);
    }
}
